#ifndef _DEMO_CLASS_H_
#define _DEMO_CLASS_H_
#include "class.h"
#include "ctype.h"


#define CPEOPLE_TYPE                 	(get_cpeople_type())
#define CPEOPLE(obj)                 	(G_TYPE_CHECK_INSTANCE_CAST ((obj), CPEOPLE_TYPE, CPeople))
#define CPEOPLE_CLASS(vclass)       	(G_TYPE_CHECK_CLASS_CAST ((vclass), CPEOPLE_TYPE, CPeopleClass))
#define IS_CPEOPLE(obj)              	(G_TYPE_CHECK_INSTANCE_TYPE ((obj), CPEOPLE_TYPE))
#define IS_CPEOPLE_CLASS(vclass)      	(G_TYPE_CHECK_CLASS_TYPE ((vclass), CPEOPLE_TYPE))
#define CPEOPLE_GET_CLASS(obj)       	(G_TYPE_INSTANCE_GET_CLASS ((obj), CPEOPLE_TYPE, CPeopleClass))
#define	CPEOPLE_PARENT_CLASS(vclass)	(G_TYPE_GET_PARENT_CLASS(vclass,CObjectClass))

typedef struct _CPeople		 			CPeople;
typedef struct _CPeopleClass 			CPeopleClass;

struct _CPeople
{
	CObject cobject;
	u16	age;
	u16	height;
	str	name;
};

struct _CPeopleClass
{
	CObjectClass cobject_class;
	void (*show_attribute)(CPeople *people);
	void (*ability)(CPeople *people);
};

u32 get_cpeople_type(void);

CPeople* cpeople_new(void);

/****************************************************************/
#define CTEACHER_TYPE                 	(get_cteacher_type())
#define CTEACHER(obj)                 	(G_TYPE_CHECK_INSTANCE_CAST ((obj), CTEACHER_TYPE, CTeacher))
#define CTEACHER_CLASS(vclass)       	(G_TYPE_CHECK_CLASS_CAST ((vclass), CTEACHER_TYPE, CTeacherClass))
#define IS_CTEACHER(obj)              	(G_TYPE_CHECK_INSTANCE_TYPE ((obj), CTEACHER_TYPE))
#define IS_CTEACHER_CLASS(vclass)      	(G_TYPE_CHECK_CLASS_TYPE ((vclass), CTEACHER_TYPE))
#define CTEACHER_GET_CLASS(obj)       	(G_TYPE_INSTANCE_GET_CLASS ((obj), CTEACHER_TYPE, CTeacherClass))
#define	CTEACHER_PARENT_CLASS(vclass)	(G_TYPE_GET_PARENT_CLASS(vclass,CPeopleClass))

typedef struct _CTeacher	 			CTeacher;
typedef struct _CTeacherClass 			CTeacherClass;

struct _CTeacher
{
	CPeople cpeople;
	str	subject;
};

struct _CTeacherClass
{
	CPeopleClass cpeople_class;
};

u32 get_cteacher_type(void);

CTeacher* cteacher_new(void);

/****************************************************************/



#endif //_DEMO_CLASS_H_
